﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using LongNet.Security;

namespace LongNet.Config
{
    [Serializable]
    public class UserConfigEntity
    {
        /// <summary>
        ///  Gets or sets the user name.
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        ///  Gets or sets the password.
        /// </summary>
        public string Password { get; set; }

        /// <summary>
        ///  Gets or sets the password salt.
        /// </summary>
        public string Salt { get; set; }

        public UserPermissions Permissions { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public UserConfigEntity()
        {
            UserName = string.Empty;
            Password = string.Empty;
            Salt = CryptoService.CreateSaltToHexString(16);
            Permissions = UserPermissions.None;
        }
    }
}
